VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Jeevan 
   Caption         =   "Bond Preparation Form"
   ClientHeight    =   10470
   ClientLeft      =   165
   ClientTop       =   555
   ClientWidth     =   10695
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   10470
   ScaleWidth      =   10695
   WindowState     =   2  'Maximized
   Begin VB.CommandButton btdelete 
      Caption         =   "Delete"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   19200
      TabIndex        =   77
      Top             =   8640
      Width           =   855
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      ForeColor       =   &H80000008&
      Height          =   975
      Left            =   15600
      ScaleHeight     =   945
      ScaleWidth      =   4545
      TabIndex        =   68
      Top             =   9240
      Width           =   4575
      Begin VB.CommandButton Command1 
         Caption         =   "Print"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3360
         TabIndex        =   70
         Top             =   480
         Width           =   1095
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   1440
         TabIndex        =   69
         Top             =   480
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   661
         _Version        =   393216
         Format          =   88211457
         CurrentDate     =   40069
      End
      Begin VB.Label Label30 
         Caption         =   "Daily Report Generation"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1080
         TabIndex        =   72
         Top             =   120
         Width           =   2175
      End
      Begin VB.Label Label27 
         Caption         =   "Select Date"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   71
         Top             =   600
         Width           =   1095
      End
   End
   Begin VB.CommandButton btsave 
      Caption         =   "Save"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   18120
      TabIndex        =   31
      Top             =   8640
      Width           =   975
   End
   Begin VB.Frame Frame3 
      Caption         =   "Agent Details"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   7935
      Left            =   9720
      TabIndex        =   35
      Top             =   1080
      Width           =   8295
      Begin VB.TextBox txtcode 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1320
         MaxLength       =   9
         TabIndex        =   19
         Top             =   1020
         Width           =   2055
      End
      Begin VB.TextBox txtintro 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   9
         TabIndex        =   20
         Top             =   1020
         Width           =   2055
      End
      Begin VB.TextBox txtunit 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1320
         MaxLength       =   9
         TabIndex        =   21
         Top             =   2175
         Width           =   2055
      End
      Begin VB.TextBox txtagent 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   9
         TabIndex        =   22
         Top             =   2175
         Width           =   2055
      End
      Begin VB.TextBox txtdepman 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1320
         MaxLength       =   9
         TabIndex        =   23
         Top             =   3285
         Width           =   2055
      End
      Begin VB.TextBox txtarea 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   9
         TabIndex        =   24
         Top             =   3285
         Width           =   2055
      End
      Begin VB.TextBox txtregman 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1320
         MaxLength       =   9
         TabIndex        =   25
         Top             =   4470
         Width           =   2055
      End
      Begin VB.TextBox txtdepadv 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   9
         TabIndex        =   26
         Top             =   4470
         Width           =   2055
      End
      Begin VB.TextBox txtdepadv1 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1320
         MaxLength       =   9
         TabIndex        =   27
         Top             =   5565
         Width           =   2055
      End
      Begin VB.TextBox txtdepadv2 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   9
         TabIndex        =   28
         Top             =   5565
         Width           =   2055
      End
      Begin VB.TextBox txtdepadv3 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1320
         MaxLength       =   9
         TabIndex        =   29
         Top             =   6720
         Width           =   2055
      End
      Begin VB.TextBox txtchf 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   9
         TabIndex        =   30
         Top             =   6720
         Width           =   2055
      End
      Begin VB.Label Label14 
         Caption         =   "Code"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   61
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label16 
         Caption         =   "Introducer"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4440
         TabIndex        =   60
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label17 
         Caption         =   "Unit"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   59
         Top             =   2235
         Width           =   855
      End
      Begin VB.Label Label18 
         Caption         =   "Agent"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4440
         TabIndex        =   58
         Top             =   2235
         Width           =   975
      End
      Begin VB.Label Label19 
         Caption         =   "Dep. Manager"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   405
         Left            =   240
         TabIndex        =   57
         Top             =   3270
         Width           =   855
      End
      Begin VB.Label Label20 
         Caption         =   "Area Dev. Manager"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   405
         Left            =   4440
         TabIndex        =   56
         Top             =   3270
         Width           =   975
      End
      Begin VB.Label Label21 
         Caption         =   "Reg. Dev. Manager"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         TabIndex        =   55
         Top             =   4410
         Width           =   975
      End
      Begin VB.Label Label22 
         Caption         =   "Dep. Advisor"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4440
         TabIndex        =   54
         Top             =   4470
         Width           =   735
      End
      Begin VB.Label Label23 
         Caption         =   "Dep. Advisor I"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   53
         Top             =   5565
         Width           =   855
      End
      Begin VB.Label Label24 
         Caption         =   "Dep. Advisor II"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4440
         TabIndex        =   52
         Top             =   5565
         Width           =   975
      End
      Begin VB.Label Label25 
         Caption         =   "Dep. Advisor III"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   51
         Top             =   6720
         Width           =   1095
      End
      Begin VB.Label Label26 
         Caption         =   "Chief Executive"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4440
         TabIndex        =   50
         Top             =   6720
         Width           =   975
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Customer Details"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   5055
      Left            =   1080
      TabIndex        =   37
      Top             =   3960
      Width           =   8295
      Begin VB.Frame Frame4 
         Height          =   615
         Left            =   1920
         TabIndex        =   75
         Top             =   1080
         Width           =   2175
         Begin VB.OptionButton Option2 
            Caption         =   "Female"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   1080
            TabIndex        =   10
            Top             =   240
            Width           =   975
         End
         Begin VB.OptionButton Option1 
            Caption         =   "Male"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   9
            Top             =   240
            Width           =   855
         End
      End
      Begin VB.Frame Frame5 
         Height          =   615
         Left            =   5760
         TabIndex        =   65
         Top             =   1080
         Width           =   2415
         Begin VB.OptionButton Option3 
            Caption         =   "S/O"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   11
            Top             =   240
            Width           =   735
         End
         Begin VB.OptionButton Option4 
            Caption         =   "W/O"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   840
            TabIndex        =   12
            Top             =   240
            Width           =   735
         End
         Begin VB.OptionButton Option5 
            Caption         =   "D/O"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   1560
            TabIndex        =   13
            Top             =   240
            Width           =   735
         End
      End
      Begin RichTextLib.RichTextBox txtaddress 
         Height          =   1215
         Left            =   1920
         TabIndex        =   18
         Top             =   3480
         Width           =   3135
         _ExtentX        =   5530
         _ExtentY        =   2143
         _Version        =   393217
         Enabled         =   -1  'True
         Appearance      =   0
         TextRTF         =   $"jeevan.frx":0000
      End
      Begin VB.TextBox txtnrelation 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         TabIndex        =   17
         Top             =   2580
         Width           =   2175
      End
      Begin VB.TextBox txtnage 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1920
         TabIndex        =   16
         Top             =   2580
         Width           =   2175
      End
      Begin VB.TextBox txtnname 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         TabIndex        =   15
         Top             =   1920
         Width           =   2175
      End
      Begin VB.TextBox txtrname 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1920
         TabIndex        =   14
         Top             =   1920
         Width           =   2175
      End
      Begin VB.TextBox txtage 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         TabIndex        =   8
         Top             =   480
         Width           =   2175
      End
      Begin VB.TextBox txtname 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1920
         TabIndex        =   7
         Top             =   480
         Width           =   2175
      End
      Begin VB.Label Label9 
         Caption         =   "Gender"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   76
         Top             =   1260
         Width           =   735
      End
      Begin VB.Label Label15 
         Caption         =   "Nominee's Relationship"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   4320
         TabIndex        =   67
         Top             =   2520
         Width           =   1095
      End
      Begin VB.Label Label29 
         Caption         =   "Relationship"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4320
         TabIndex        =   66
         Top             =   1260
         Width           =   1095
      End
      Begin VB.Label Label13 
         Caption         =   "Address"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   49
         Top             =   3480
         Width           =   735
      End
      Begin VB.Label Label12 
         Caption         =   "Nominee's Age"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   48
         Top             =   2640
         Width           =   1455
      End
      Begin VB.Label Label11 
         Caption         =   "Nominee's Name"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4320
         TabIndex        =   47
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label10 
         Caption         =   "Father's/Husband's Name"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   46
         Top             =   1920
         Width           =   1695
      End
      Begin VB.Label Label8 
         Caption         =   "Age"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4440
         TabIndex        =   45
         Top             =   540
         Width           =   1215
      End
      Begin VB.Label Label7 
         Caption         =   "Name"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   44
         Top             =   540
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Plan Details"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2535
      Left            =   1080
      TabIndex        =   36
      Top             =   1080
      Width           =   8295
      Begin VB.ComboBox cbreg 
         Height          =   315
         Left            =   1440
         TabIndex        =   64
         Top             =   330
         Width           =   1575
      End
      Begin MSComCtl2.DTPicker txtdate 
         Height          =   375
         Left            =   5640
         TabIndex        =   1
         Top             =   300
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   661
         _Version        =   393216
         Format          =   88211457
         CurrentDate     =   40047
      End
      Begin VB.ComboBox cbterm 
         Height          =   315
         Left            =   5640
         TabIndex        =   3
         Top             =   1170
         Width           =   1575
      End
      Begin VB.ComboBox cbcost 
         Height          =   315
         Left            =   6720
         TabIndex        =   6
         Top             =   1890
         Width           =   1095
      End
      Begin VB.ComboBox cbinst 
         Height          =   315
         Left            =   5640
         TabIndex        =   5
         Top             =   1890
         Width           =   975
      End
      Begin VB.ComboBox cbmode 
         Height          =   315
         Left            =   1440
         TabIndex        =   4
         Top             =   1890
         Width           =   1575
      End
      Begin VB.ComboBox cbplan 
         Height          =   315
         Left            =   1440
         TabIndex        =   2
         Top             =   1170
         Width           =   1575
      End
      Begin VB.TextBox txtregno 
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   1440
         TabIndex        =   0
         Top             =   345
         Width           =   1575
      End
      Begin VB.Label Label6 
         Caption         =   "Installment and Cost"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4080
         TabIndex        =   43
         Top             =   1860
         Width           =   855
      End
      Begin VB.Label Label5 
         Caption         =   "Mode of Payment"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   120
         TabIndex        =   42
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "Term"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4080
         TabIndex        =   41
         Top             =   1200
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "Plan No."
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   40
         Top             =   1200
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "Date Of Commencement"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4080
         TabIndex        =   39
         Top             =   300
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "CSS.No."
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   38
         Top             =   360
         Width           =   1335
      End
   End
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      ForeColor       =   &H80000008&
      Height          =   855
      Left            =   240
      ScaleHeight     =   825
      ScaleWidth      =   5985
      TabIndex        =   62
      Top             =   9360
      Width           =   6015
      Begin VB.CommandButton btprintall 
         Caption         =   "Print All"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4800
         TabIndex        =   34
         Top             =   240
         Width           =   975
      End
      Begin VB.ComboBox sprint 
         Height          =   315
         Left            =   1800
         TabIndex        =   32
         Top             =   240
         Width           =   1455
      End
      Begin VB.CommandButton btprint 
         Caption         =   "Print"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3600
         TabIndex        =   33
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label28 
         Caption         =   "Enter the Reg No."
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   63
         Top             =   240
         Width           =   1575
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   480
      Top             =   10440
      Width           =   4695
      _ExtentX        =   8281
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Image Image1 
      Height          =   840
      Left            =   7680
      Stretch         =   -1  'True
      Top             =   0
      Width           =   960
   End
   Begin VB.Label Label32 
      Caption         =   "JEEVAN VAISYA GREEN AGROTECH LLP"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   8640
      TabIndex        =   74
      Top             =   240
      Width           =   5895
   End
   Begin VB.Label Label31 
      Caption         =   "BOND PREPARATION FORM"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   10320
      TabIndex        =   73
      Top             =   720
      Width           =   2535
   End
End
Attribute VB_Name = "Jeevan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim s(10), a, b, c As String
Dim db, db1, db2, db3, d1, dn2 As Connection
Dim rs, rs2, rs3, rs4, rs5, rs6 As Recordset
Dim rs1 As Recordset
Dim d2, day1 As String
Dim d10 As Connection
Dim rs10 As Recordset
Dim rsEdit As Recordset
Dim mop As Integer
Private Sub printing()
Dim j As Variant
Dim d, d1 As Integer
d = 0
d1 = 380
For i = 0 To 10
s(i) = ""
Next
Printer.ScaleMode = vbTwips
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Select * from Customer", db
rs1.MoveFirst
While Not rs1.EOF
If sprint.Text = rs1.Fields(0) Then
'Printer.PaperSize = vbPRPSA4
'Printer.Font = "Tahoma"
Printer.Font = "Copperplate Gothic Light"
'Printer.Font = "Courier New"
Printer.FontSize = 12
If rs1.Fields(2) = "PlanB" Then d = 220
If rs1.Fields(2) = "PlanD" Then
Set rs2 = New Recordset
rs2.LockType = adLockOptimistic
rs2.CursorLocation = adUseServer
rs2.CursorType = adOpenKeyset
rs2.Open "Select MonConsi from " & rs1.Fields(2), db
Printer.CurrentX = 7700
Printer.CurrentY = 3800 - d
Printer.Print rs2.Fields(0)
rs2.Close
End If
mop = Switch(rs1!mop = "Mly", 1, rs1!mop = "Qly", 3, rs1!mop = "Hly", 6, rs1!mop = "Yly", 12, 1, 0)
Printer.CurrentX = 1150
Printer.CurrentY = 4300 - d
'new line is change
Printer.Print Space(1); rs1.Fields(0).Name; rs1.Fields(0); Space(5); Switch(rs1.Fields(2) = "PlanA", "A", rs1.Fields(2) = "PlanB", "B", rs1.Fields(2) = "PlanC", "C", rs1.Fields(2) = "PlanD", "D"); "-"; Switch(rs1.Fields(3) = "2.5", "2Y 6M", rs1.Fields(3) <> "2.5", rs1.Fields(3) & " Yrs.")
'Printer.Print Space(20); datechange(rs1.Fields(1)); Space(10); "UNIT"; "-"; Switch(rs1.Fields(2) = "PlanA", Round((Int(rs1!inst) / 100) * 0.15, 1), rs1.Fields(2) = "PlanB", Round((Int(rs1!inst) / 10000), 1), rs1.Fields(2) = "PlanC", Round((Int(rs1!inst) / 100) * 0.5, 1), rs1.Fields(2) = "PlanD", Int(rs1!inst) / 10000)
'Printer.Print
Printer.CurrentX = 1270
Printer.Print datechange(rs1.Fields(1)); Space(5);
X = Printer.CurrentX
Y = Printer.CurrentY
Printer.CurrentX = X
Printer.CurrentY = Y + 50
'Printer.Font = "Tahoma"
Printer.FontSize = 9
Printer.Print Switch(rs1.Fields(2) = "PlanA", Round(((Val(rs1!Amt)) / 20), 2), rs1.Fields(2) = "PlanB", Round((Val(rs1!Amt) / 10), 1), rs1.Fields(2) = "PlanC", Round((Val(rs1!Amt)) / 20, 2), rs1.Fields(2) = "PlanD", Round((Val(rs1!Amt) / 10), 2)); " Sq.Ft."
'Printer.Font = "Copperplate Gothic Light"
Printer.FontSize = 11
Printer.CurrentY = 4400 - d
Printer.CurrentX = 4900
Printer.Print rs1.Fields(6); Space(15); rs1.Fields(4); Space(14); rs1.Fields(5)
Printer.Print
Printer.CurrentY = 4950 - d
Printer.CurrentX = 2000
Printer.Print rs1.Fields(11); Space(5); rs1.Fields(12); Space(1); "Yrs."; Space(5); rs1.Fields(13)
Printer.Print
Printer.CurrentY = 5550
Printer.CurrentX = 2000
If rs1.Fields(2) = "PlanA" Or rs1.Fields(2) = "PlanC" Then
Printer.Print "On or before "; days(datechange(rs1!DateCom)); Switch(days(datechange(rs1.Fields(1))) > 10 And days(datechange(rs1.Fields(1))) <= 20, "th", (days(datechange(rs1.Fields(1))) Mod 10) = 1, "st", (days(datechange(rs1.Fields(1))) Mod 10) = 2, "nd", (days(datechange(rs1.Fields(1))) Mod 10) = 3, "rd", (days(datechange(rs1.Fields(1))) Mod 10) > 3, "th", (days(datechange(rs1.Fields(1))) Mod 10) = 0, "th"); " of every"; Space(2); Switch(rs1.Fields(4) = "Mly", "Month", rs1.Fields(4) = "Qly", "3 Months", rs1.Fields(4) = "Hly", "6 Months", rs1.Fields(4) = "Yly", "Year")
End If
Printer.Print
Printer.Print
Printer.CurrentX = 2000
If rs1.Fields(2) <> "PlanB" Then
Set rs2 = New Recordset
rs2.LockType = adLockOptimistic
rs2.CursorLocation = adUseServer
rs2.CursorType = adOpenKeyset
rs2.Open "Select ExpConsi from " & rs1.Fields(2) & " where Consi='" & rs1.Fields(6) & "'", db
Else
a = Switch(rs1.Fields(3) = "2", "Scheme1", rs1.Fields(3) = "4", "Scheme2", rs1.Fields(3) = "6", "Scheme3")
Set rs2 = New Recordset
rs2.LockType = adLockOptimistic
rs2.CursorLocation = adUseServer
rs2.CursorType = adOpenKeyset
b = rs1!Amt
rs2.Open "Select " & a & " from " & rs1.Fields(2) & " where Consi='" & b & "'", db
End If
Printer.CurrentY = 5900 - d
Printer.Print rs1.Fields(7);
Printer.Print
Printer.CurrentX = 2000
Printer.Print rs1.Fields(18); ", "; rs1.Fields(10); ","
Call address(rs1.Fields(14))
For Each j In s
Printer.CurrentX = 2000
Printer.Print j
Next j
Printer.CurrentY = 5900 - d
Printer.CurrentX = 6800
Printer.Print rs2.Fields(0)
Printer.Print
Printer.CurrentX = 6800
If rs1.Fields(2) = "PlanA" Or rs1.Fields(2) = "PlanC" Then
Printer.Print lastdue()
End If
Printer.CurrentY = 6850 - d
Printer.CurrentX = 6800
Printer.Print expiry()
Printer.CurrentY = 7200 - d
Printer.CurrentX = 6800
Printer.Print rs1!DistributorCode
Printer.Print vbNewLine
Printer.CurrentY = 8150 - d
Printer.CurrentX = 2800
Printer.FontSize = 9
If rs1.Fields(2) <> "PlanB" Then
Printer.Print convert(Val(rs2!ExpConsi)) + "Only"
Else
Printer.Print convert(Val(rs2.Fields(0))) + "Only"
End If
Printer.CurrentX = 1050
Printer.CurrentY = 9350 - d
Printer.FontSize = 11
Printer.Print Format(Now, "dd/mm/yyyy")
Printer.CurrentY = 11600 - d
Printer.CurrentX = 9000
Printer.Print "Madurai"
Printer.CurrentX = 9000
Printer.Print "0452"
Printer.CurrentX = 9000
Printer.Print rs1.Fields(17)
Printer.CurrentX = 9000
Printer.Print rs1.Fields(16)
Printer.CurrentY = 13400 - d
Printer.CurrentX = 1500
Printer.Print rs1.Fields(7); Space(25); rs1.Fields(8); " Yrs."
Printer.CurrentX = 1500
Printer.Print rs1.Fields(18); ", "; rs1.Fields(10); ","
Call address(rs1.Fields(14))
For Each j In s
Printer.CurrentX = 1500
Printer.Print j
Next j
Printer.CurrentY = 12800 + 200 - d
Printer.CurrentX = 9000
Printer.Print rs1.Fields(0).Name; rs1.Fields(0);
Printer.CurrentY = 13050 + 150 - d
Printer.CurrentX = 9000
Printer.Print datechange(rs1.Fields(1))
Printer.CurrentY = 13300 + 150 - d
Printer.CurrentX = 9000
Printer.Print Switch(rs1.Fields(2) = "PlanA", "Plan-A", rs1.Fields(2) = "PlanB", "Plan-B", rs1.Fields(2) = "PlanC", "Plan-C", rs1.Fields(2) = "PlanD", "Plan-D"); " & "; Switch(rs1.Fields(3) = "2.5", "2Y 6M", rs1.Fields(3) <> "2.5", rs1.Fields(3) & " Yrs.")
Printer.CurrentY = 13550 + 200 - d
Printer.CurrentX = 9000
Printer.Print rs1.Fields(6)
Printer.CurrentY = 13800 + 200 - d
Printer.CurrentX = 9000
Printer.Print rs1.Fields(5)
Printer.CurrentY = 14050 + 200 - d
Printer.CurrentX = 9000
If rs1.Fields(2) = "PlanA" Or rs1.Fields(2) = "PlanC" Then
d2 = datechange(rs1!DateCom)
m = (months(d2) + mop) Mod 12
m = Switch(m = 0, 12, 1, m)
day1 = Switch(days(d2) > 28 And m = 2, days(d2) - (days(d2) - 28), days(d2) > 30 And (m = 4 Or m = 6 Or m = 9 Or m = 11), days(d2) - 1, 1, days(d2))
Printer.Print day1 & "/" & Switch(m < 10, "0" & m, 1, m) & "/" & Switch(Val(months(datechange(rs1.Fields(1)))) + mop >= 12, Year(datechange(rs1.Fields(1))) + 1, 1, Year(datechange(rs1.Fields(1))))
End If
Printer.CurrentY = 14300 + 250 - d
Printer.CurrentX = 9000
Printer.Print expiry()
Printer.CurrentY = 14550 + 250 - d
Printer.CurrentX = 9000
Printer.Print rs1.Fields(15)
Printer.Print
Printer.CurrentY = 15000 + 150 - d
Printer.CurrentX = 1500
Printer.FontSize = 9
If rs1.Fields(2) = "PlanA" Or rs1.Fields(2) = "PlanC" Then
Printer.Print convert(Val(rs1.Fields(5))) & "Only"
End If
Printer.Print
Printer.CurrentY = 15000 + 450 - d
Printer.CurrentX = 1600
'Printer.FontSize = 11
Printer.Print distributor()
Printer.EndDoc
rs1!Printed = "P"
rs1.Update
End If
rs1.MoveNext
Wend
sprint.Text = ""
End Sub
Private Sub btdelete_Click()
If cbplan = "PlanA" Or cbplan = "PlanC" Then Call senior(txtcode, -Val(cbinst), 1)
If cbplan = "PlanB" Or cbplan = "PlanD" Then Call senior(txtcode, -(Val(cbcost) * 20 / 100), 1)
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Delete from Customer where JVM ='" & cbreg.Text & "'", db
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Delete from Agent where RegnNo ='" & cbreg.Text & "'", db
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
If cbplan = "PlanA" Or cbplan = "PlanC" Then rs1.Open "Delete from Fine where JVM='" & cbreg.Text & "'", db
Call database
If cbplan = "PlanA" Or cbplan = "PlanC" Then rs1.Open "Delete from " & cbplan & cbmode & " where JVM='" & cbreg.Text & "'", db2
Call clearing
End Sub

Private Sub btprint_Click()
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Select * from Customer where JVM ='" & sprint.Text & "'", db
Call printing
End Sub

Private Sub btprintall_Click()
Dim Y, z As Integer
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
Y = sprint.ListCount - 1
For z = 0 To Y
sprint.Text = sprint.List(0)
rs1.Open "Select * from Customer where JVM ='" & sprint.Text & "'", db
Call printing
rs1.Close
sprint.RemoveItem (0)
Next z
End Sub

Private Sub btsave_Click()
Dim n, n1 As Long
Dim minAmt As Long
Call database1
Call normal
If Switch(txtregno.Visible = True, txtregno.Text, 1, cbreg.Text) = "" Or txtdate.Value = "" Or cbplan.Text = "--Select Plan--" Or cbterm.Text = "--Select Term--" Or cbmode.Text = "--Select Mode--" Or (cbinst.Text = "" And (cbplan.Text = "PlanA" Or cbplan.Text = "PlanC")) Or cbcost.Text = "" Or txtname.Text = "" Or txtage.Text = "" Or txtnname.Text = "" Or txtnrelation.Text = "" Or txtaddress.Text = "" Or txtnage.Text = "" Or txtcode.Text = "" Or txtintro.Text = "" Or txtunit.Text = "" Or (Option1.Value = False And Option2.Value = False) Then
MsgBox "Fill All Fields"
Else
If txtregno.Visible = True Then
n = updation()
n1 = updation1
rs1.AddNew
rs1.Fields(0) = n
rs1.Fields(17) = n1
rs1!DOE = Now
Else
'rs5.EditMode
rs1.Fields(0) = cbreg.Text
Set rsEdit = New Recordset
rsEdit.LockType = adLockOptimistic
rsEdit.CursorLocation = adUseServer
rsEdit.CursorType = adOpenKeyset
rsEdit.Open "Select * from Customer where JVM='" & cbreg.Text & "'", db
minAmt = Switch(IsNull(rsEdit!Inst), 0, rsEdit!Inst = 0, 0, rsEdit!Inst = "", 0, 1, rsEdit!Inst)
End If
Call assign
End If
If txtregno.Text <> "" And txtcode.Text <> "" And txtintro.Text <> "" And txtunit.Text <> "" Then
If txtregno.Visible = True Then
rs2.AddNew
rs2.Fields(0) = n
Else
'rs2.EditMode
rs2.Fields(0) = cbreg.Text
End If
rs2.Fields(1) = txtcode.Text
rs2.Fields(2) = txtintro.Text
rs2.Fields(3) = txtunit.Text
rs2.Fields(4) = txtagent.Text
rs2.Fields(5) = txtdepman.Text
rs2.Fields(6) = txtarea.Text
rs2.Fields(7) = txtregman.Text
rs2.Fields(8) = txtdepadv.Text
rs2.Fields(9) = txtdepadv1.Text
rs2.Fields(10) = txtdepadv2.Text
rs2.Fields(11) = txtdepadv3.Text
rs2.Fields(12) = txtchf.Text

If cbplan = "PlanA" Or cbplan = "PlanC" Then
Call database

If txtregno.Visible = True Then
rs3.AddNew
rs3.Fields(0) = rs1.Fields(0)
Call senior(txtcode, Val(cbinst), 1)
Call database6
rs6.AddNew
rs6.Fields(0) = rs1.Fields(0)
rs6.Update
Else
Call senior(txtcode, -Val(minAmt), 1)
Call senior(txtcode, Val(cbinst), 1)
End If
rs3.Fields(1) = rs1!Name
rs3.Fields(2) = cbinst
rs3.Fields(3) = txtdate
rs3.Update
Else
If txtregno.Visible = True Then Call senior(txtcode, (Val(cbcost) * 20 / 100), 1)
'If cbplan = "PlanD" Then Call planD_assign(n)
End If
rs1.Update
rs2.Update

End If
MsgBox "Record Updated"
l:
rs1.Close
rs2.Close
Call clearing
End Sub
Private Sub cbinst_Click()
rs.MoveFirst
cbcost.Clear
While Not rs.EOF
For i = 0 To rs.Fields.Count - 1
If cbmode.Text = rs.Fields(i).Name And cbinst.Text = rs.Fields(i) Then
cbcost.AddItem (rs!Consi)
End If
Next
rs.MoveNext
Wend
End Sub
Private Sub cbmode_Click()
Set rs = New Recordset
rs.LockType = adLockOptimistic
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
rs.Open "Select * from " & cbplan.Text, db
rs.MoveFirst
cbinst.Clear
For i = 0 To rs.Fields.Count - 1
If cbmode.Text = rs.Fields(i).Name Then
While Not rs.EOF
cbinst.AddItem (rs.Fields(i))
rs.MoveNext
cbinst.Enabled = True
Wend
End If
Next
If cbmode.Text = "Lump Sum" Then
rs.MoveFirst
cbinst.Enabled = False
cbcost.Clear
While Not rs.EOF
cbcost.AddItem (rs!Consi)
rs.MoveNext
Wend
End If
End Sub
Private Sub cbplan_Click()
cbterm.Clear
cbterm.Text = "--Select Term--"
If cbplan.Text = "PlanA" Then
cbterm.AddItem ("2.5")
ElseIf cbplan.Text = "PlanB" Then
cbterm.AddItem ("2")
cbterm.AddItem ("4")
cbterm.AddItem ("6")
Else
cbterm.AddItem ("5")
End If
cbmode.Clear
cbmode.Text = "--Select Mode--"
If cbplan.Text = "PlanA" Or cbplan.Text = "PlanC" Then
cbmode.AddItem ("Mly")
cbmode.AddItem ("Qly")
cbmode.AddItem ("Hly")
cbmode.AddItem ("Yly")
Else
cbmode.AddItem ("Lump Sum")
End If
End Sub

Private Sub cbreg_Click()
If cbreg.Visible = True Then
Set rs = New Recordset
rs.LockType = adLockOptimistic
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
rs.Open "Select * from customer", db
If Not rs.EOF Then
rs.MoveFirst
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Select * from Agent", db
rs1.MoveFirst
While Not rs.EOF
If cbreg.Text = rs.Fields(0) Then
txtdate.Value = rs.Fields(1)
cbplan.Text = rs.Fields(2)
cbterm.Text = rs.Fields(3)
cbmode.Text = rs.Fields(4)
cbinst.Text = rs.Fields(5)
cbcost.Text = rs.Fields(6)
txtname.Text = rs.Fields(7)
txtage.Text = rs.Fields(8)
If rs.Fields(9) = "MALE" Then
Option1.Value = True
Else
Option2.Value = True
End If
If rs.Fields(18) = "S/O" Then
Option3.Value = True
ElseIf rs.Fields(18) = "W/O" Then
Option4.Value = True
Else
Option5.Value = True
End If
txtrname.Text = rs.Fields(10)
txtnname.Text = rs.Fields(11)
txtnage.Text = rs.Fields(12)
txtnrelation.Text = rs.Fields(13)
txtaddress.Text = rs.Fields(14)
txtcode.Text = rs.Fields(15)
txtregno.Text = rs.Fields(16)
End If
rs.MoveNext
Wend
While Not rs1.EOF
If cbreg.Text = rs1.Fields(0) Then
txtcode.Text = rs1.Fields(1)
txtintro.Text = rs1.Fields(2)
txtunit.Text = rs1.Fields(3)
txtagent.Text = rs1.Fields(4)
txtdepman.Text = rs1.Fields(5)
txtarea.Text = Switch(IsNull(rs1.Fields(6)), "", 1, rs1.Fields(6))
txtregman.Text = rs1.Fields(7)
txtdepadv.Text = rs1.Fields(8)
txtdepadv1.Text = rs1.Fields(9)
txtdepadv2.Text = rs1.Fields(10)
txtdepadv3.Text = rs1.Fields(11)
txtchf.Text = rs1.Fields(12)
End If
rs1.MoveNext
Wend
rs.Close
rs1.Close
End If
End If
End Sub
Private Sub cbreg_GotFocus()
If cbreg.Visible = True Then
cbreg.Clear
Set rs = New Recordset
rs.LockType = adLockOptimistic
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
rs.Open "Select JVM from customer", db
If Not rs.EOF Then
rs.MoveFirst
While Not rs.EOF
cbreg.AddItem (rs.Fields(0))
rs.MoveNext
Wend
End If
End If
rs.Close
End Sub
Private Sub Command1_Click()
Dim da() As String
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Select name, jvm, datecom, mop, inst, DistributorCode, planno, amt from Customer where DateCom like '" & Format(DTPicker1.Value, "m/d/yyyy") & "%' and DOE like '" & Format(DTPicker1.Value, "m/d/yyyy") & "%'", db
Call report
rs1.Close
rs1.Open "Select name, jvm, datecom, mop, inst, DistributorCode, planno, amt from Customer where DateCom not like '" & Format(DTPicker1.Value, "m/d/yyyy") & "%' and DOE like '" & Format(DTPicker1.Value, "m/d/yyyy") & "%'", db
i = 1
If rs1.RecordCount <> 0 Then
ReDim da(rs1.RecordCount + 1) As String
da(0) = ""
While Not rs1.EOF
da(i) = Switch(i = 1, rs1!DateCom, Format(rs1!DateCom, "m/d/yyyy") <> Format(da(i - 1), "m/d/yyyy"), rs1!DateCom, 1, "")
If Format(rs1!DateCom, "m/d/yyyy") <> Format(da(i - 1), "m/d/yyyy") Then i = i + 1
rs1.MoveNext
Wend
rs1.Close
For j = 1 To i - 1
rs1.Open "Select name, jvm, datecom, mop, inst, DistributorCode, planno, amt from Customer where DateCom like '" & Format(da(j), "m/d/yyyy") & "%' and DOE like '" & Format(DTPicker1.Value, "m/d/yyyy") & "%'", db
Call report
rs1.Close
Next
End If
End Sub
Private Sub Form_Load()
Adodc1.Visible = False
btsave.Enabled = False
txtdate.Value = Now
'btprint.Enabled = False
Set db = New Connection
db.Provider = "Microsoft.Jet.OLEDB.4.0"
db.Open App.Path & "\Jeevan.mdb"
cbplan.Clear
cbterm.Text = "--Select Term--"
cbplan.Text = "--Select Plan--"
cbmode.Text = "--Select Mode--"
cbplan.AddItem ("PlanA")
cbplan.AddItem ("PlanB")
cbplan.AddItem ("PlanC")
cbplan.AddItem ("PlanD")
DTPicker1.Value = Now
End Sub

Private Sub sprint_Change()
btprint.Enabled = True
End Sub

Private Sub sprint_DropDown()
sprint.Clear
btprint.Enabled = True
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
rs1.Open "Select JVM from Customer where Printed='N'", db
If Not rs1.EOF Then
rs1.MoveFirst
While Not rs1.EOF
sprint.AddItem (rs1!JVM)
rs1.MoveNext
Wend
End If
rs1.Close
End Sub

Private Sub txtagent_LostFocus()
Dim a As Boolean
If txtagent <> "" Then
a = emp(txtagent)
If a = True Then MsgBox "Invalid Code No."
End If
End Sub
Private Sub txtarea_LostFocus()
Dim a As Boolean
If txtarea <> "" Then
a = emp(txtarea)
If a = True Then MsgBox "Invalid Code No."
End If
End Sub
Private Sub txtchf_LostFocus()
Dim a As Boolean
If txtchf <> "" Then
a = emp(txtchf)
If a = True Then MsgBox "Invalid Code No."
End If
End Sub

Private Sub txtcode_LostFocus()
Dim a As Boolean
If txtcode <> "" Then
a = emp(txtcode)
txtintro.Text = ""
txtunit.Text = ""
txtagent.Text = ""
txtdepman.Text = ""
txtarea.Text = ""
txtregman.Text = ""
txtdepadv.Text = ""
txtdepadv1.Text = ""
txtdepadv2.Text = ""
txtdepadv3.Text = ""
txtchf.Text = ""
If a = True Then
MsgBox "Invalid Code No."
txtcode = ""
txtcode.SetFocus
Else
Call agentassign(txtcode.Text)
End If
End If
End Sub
Private Sub txtdepadv_LostFocus()
Dim a As Boolean
If txtdepadv <> "" Then
a = emp(txtdepadv)
If a = True Then
MsgBox "Invalid Code No."
txtdepadv = ""
txtdepadv.SetFocus
End If
End If
End Sub
Private Sub txtdepadv1_LostFocus()
Dim a As Boolean
If txtdepadv1 <> "" Then
a = emp(txtdepadv1)
If a = True Then
MsgBox "Invalid Code No."
txtdepadv1 = ""
txtdepadv1.SetFocus
End If
End If
End Sub
Private Sub txtdepadv2_LostFocus()
Dim a As Boolean
If txtdepadv2 <> "" Then
a = emp(txtdepadv2)
If a = True Then
MsgBox "Invalid Code No."
txtdepadv2 = ""
txtdepadv2.SetFocus
End If
End If
End Sub
Private Sub txtdepadv3_LostFocus()
Dim a As Boolean
If txtdepadv3 <> "" Then
a = emp(txtdepadv3)
If a = True Then
MsgBox "Invalid Code No."
txtdepadv3 = ""
txtdepadv3.SetFocus
End If
End If
End Sub

Private Sub txtdepman_LostFocus()
Dim a As Boolean
If txtdepman <> "" Then
a = emp(txtdepman)
If a = True Then
MsgBox "Invalid Code No."
txtdepman = ""
txtdepman.SetFocus
End If
End If
End Sub

Private Sub txtintro_LostFocus()
Dim a As Boolean
If txtintro <> "" Then
a = emp(txtintro)
If a = True Then
MsgBox "Invalid Code No."
txtintro = ""
txtintro.SetFocus
End If
End If
End Sub
Private Sub txtregman_LostFocus()
Dim a As Boolean
If txtregman <> "" Then
a = emp(txtregman)
If a = True Then
MsgBox "Invalid Code No."
txtregman = ""
txtregman.SetFocus
End If
End If
End Sub

Private Sub txtunit_LostFocus()
Dim a As Boolean
If txtunit <> "" Then
a = emp(txtunit)
If a = True Then
MsgBox "Invalid Code No."
txtunit = ""
txtunit.SetFocus
Else
btsave.Enabled = True
btprint.Enabled = True
End If
End If
End Sub
Private Function address(X As String) As Integer
j = 0
s(0) = ""
For i = 1 To Len(X)
If AscW(Mid(X, i, 1)) <> 13 Then
s(j) = s(j) + Mid(X, i, 1)
Else
j = j + 1
s(j) = ""
i = i + 1
End If
Next i
address = j
End Function
Private Function printword(n As Long, ch As String) As String
Dim one() As String
Dim ten() As String
Dim s As String
ReDim one(20)
one(0) = ""
one(1) = "One"
one(2) = "Two"
one(3) = "Three"
one(4) = "Four"
one(5) = "Five"
one(6) = "Six"
one(7) = "Seven"
one(8) = "Eight"
one(9) = "Nine"
one(10) = "Ten"
one(11) = "Eleven"
one(12) = "Twelve"
one(13) = "Thirteen"
one(14) = "Fourteen"
one(15) = "Fifteen"
one(16) = "Sixteen"
one(17) = "Seventeen"
one(18) = "Eighteen"
one(19) = "Nineteen"
ReDim ten(10)
ten(0) = ""
ten(1) = "Twenty"
ten(2) = "Thirty"
ten(3) = "Fourty"
ten(4) = "Fifty"
ten(5) = "Sixty"
ten(6) = "Seventy"
ten(7) = "Eighty"
ten(8) = "Ninety"
If n <> 0 Then
If n > 19 Then
s = ten(Int(n / 10) - 1) + " " + one(n Mod 10) + ch
Else
s = one(n) + ch
End If
End If
printword = s + " "
End Function
Private Function convert(X As Long) As String
Dim s As String
s = " "
s = printword(Int(X / 10000000), " Crore") + printword(Int(Int(X / 100000) Mod 100), " Lakh") + printword(Int(Int((X / 1000)) Mod 100), " Thousand") + printword(Int(Int(X Mod 1000) / 100), " Hundred") + printword(Int(X Mod 100), " ")
convert = s
End Function
Private Function lastdue() As String
Dim d As Date
Dim m As Integer
If rs1.Fields(2) = "PlanA" Then
d2 = (datechange(rs1!DateCom))
m = Switch(months(d2) + 30 - mop < 1, 12 - months(d2) + 30 - mop, 1, months(d2) + 30 - mop) Mod 12
'next line is newly joined line pls verify
m = Switch(m = 0, 12, 1, m)
day1 = Switch(days(d2) > 28 And m = 2, days(d2) - (days(d2) - 28), days(d2) > 30 And (m = 4 Or m = 6 Or m = 9 Or m = 11), days(d2) - 1, 1, days(d2))
'In the next line 1 is subtracted in the switch case pls verify
lastdue = day1 & "/" & Switch(m < 10, "0" & m, 1, m) & "/" & Year(datechange(rs1.Fields(1))) + (2 + Switch((months(datechange(rs1!DateCom)) - 1) + 6 > 12, 1, 1, 0))
'lastdue = day1 & "/" & Format((CDate(datechange(rs1.Fields(1)))) + (912.5 - (30 * mop)), "mm/yyyy")
ElseIf rs1.Fields(2) = "PlanC" Then
d2 = (datechange(rs1!DateCom))
m = Switch(months(d2) - mop < 1, 12 - months(d2) - mop, 1, months(d2) - mop)
day1 = Switch(days(d2) > 28 And m = 2, days(d2) - (days(d2) - 28), days(d2) > 30 And (m = 4 Or m = 6 Or m = 9 Or m = 11), days(d2) - 1, 1, days(d2))
d = days((datechange(rs1!DateCom))) & "/" & months(datechange(rs1!DateCom)) & "/" & (Year(datechange(rs1!DateCom)) + Val(rs1.Fields(3)))
lastdue = Switch(Val(day1) < 10, "0" & Val(day1), 1, day1) & "/" & Format(d - 30 * mop, "mm/yyyy")
End If
End Function
Private Function expiry() As String
Dim m As Integer
If rs1.Fields(2) = "PlanA" Then
d2 = (datechange(rs1!DateCom))
m = Switch(((months(d2) + 30) Mod 12) = 0, 12, 1, (months(d2) + 30) Mod 12)
day1 = Switch(days(d2) > 28 And m = 2, days(d2) - (days(d2) - 28), days(d2) > 30 And (m = 4 Or m = 6 Or m = 9 Or m = 11), days(d2) - 1, 1, days(d2))
expiry = day1 & "/" & Switch(m < 10, "0" & m, 1, m) & "/" & Year(datechange(rs1.Fields(1))) + (2 + Switch(months(datechange(rs1!DateCom)) + 6 > 12, 1, 1, 0))
Else
d2 = (datechange(rs1!DateCom))
m = months(d2)
day1 = Switch(days(d2) > 28 And m = 2, days(d2) - (days(d2) - 28), days(d2) > 30 And (m = 4 Or m = 6 Or m = 9 Or m = 11), days(d2) - 1, 1, days(d2))
expiry = Switch(Val(day1) < 10, "0" & Val(day1), 1, Val(day1)) & "/" & months(datechange(rs1!DateCom)) & "/" & (Year(datechange(rs1!DateCom)) + Val(rs1.Fields(3)))
End If
End Function
Private Function updation() As String
Dim k As Long
If rs1.BOF Then
k = 100001
Else
k = Val(b) + 1
End If
updation = k
End Function
Private Function updation1() As String
Dim l As Integer
If rs1.BOF Then
l = 1
Else
l = Val(c) + 1
End If
updation1 = l
End Function
Private Function distributor() As String
Set rs3 = New Recordset
rs3.LockType = adLockOptimistic
rs3.CursorLocation = adUseServer
rs3.CursorType = adOpenKeyset
rs3.Open "Select * from Agent where RegnNo='" & rs1.Fields(0) & "'", db
i = 1
j = 4
c = 0
a = ""
rs3.MoveFirst
While Not rs3.EOF
While j < rs3.Fields.Count
If rs3.Fields(j) <> "" Then
c = c + 1
If c = 7 Then a = a & vbNewLine
a = a & rs3.Fields(j) & "(" & i & ")" & "  "
End If
i = i + 1
j = j + 1
Wend
rs3.MoveNext
Wend
distributor = a
End Function
Private Sub clearing()
txtregno.Text = ""
txtdate.Value = Now()
cbplan.Text = "--Select Plan--"
cbterm.Text = "--Select Term--"
cbmode.Text = "--Select Mode of Pay--"
cbinst.Text = ""
cbcost.Text = ""
txtname.Text = ""
txtage.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
txtrname.Text = ""
txtnname.Text = ""
txtnage.Text = ""
txtnrelation.Text = ""
txtaddress.Text = ""
txtcode.Text = ""
txtintro.Text = ""
txtunit.Text = ""
txtagent.Text = ""
txtdepman.Text = ""
txtarea.Text = ""
txtregman.Text = ""
txtdepadv.Text = ""
txtdepadv1.Text = ""
txtdepadv2.Text = ""
txtdepadv3.Text = ""
txtchf.Text = ""
btsave.Enabled = False
cbreg.Text = "--Select Reg No.--"
'btprint.Enabled = False
If txtregno.Visible = True Then
txtregno.SetFocus
Else
cbreg.SetFocus
End If
End Sub
Private Sub database()
Set db2 = New Connection
db2.Provider = "Microsoft.Jet.OLEDB.4.0"
If cbplan = "PlanA" Or cbplan = "PlanC" Then
db2.Open App.Path & "\" & cbplan & ".mdb"
Set rs3 = New Recordset
rs3.CursorLocation = adUseServer
rs3.CursorType = adOpenKeyset
rs3.LockType = adLockOptimistic
If txtregno.Visible = True Then
rs3.Open "select * from " & cbplan & cbmode, db2
Else
rs3.Open "select * from " & cbplan & cbmode & " where JVM='" & cbreg.Text & "'", db2
End If
End If
End Sub
Private Sub database1()
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
Set rs2 = New Recordset
rs2.LockType = adLockOptimistic
rs2.CursorLocation = adUseServer
rs2.CursorType = adOpenKeyset
If txtregno.Visible = True Then
rs1.Open "SELECT * FROM Customer WHERE Branch IS NULL OR Branch='' ORDER BY JVM", db
rs2.Open "Select * from Agent", db
Else
rs1.Open "Select * from Customer where JVM='" & cbreg.Text & "'", db
rs2.Open "Select * from Agent where RegnNo='" & cbreg.Text & "'", db
End If
End Sub
Private Sub normal()
If txtregno.Visible = True Then
If Not rs1.BOF Then
rs1.MoveLast
b = rs1.Fields(0)
c = rs1!Reciept
End If
'If Not rs1.BOF Then
'rs1.MoveFirst
'While Not rs1.EOF
'If txtregno.Text = rs1.Fields(0) Then
'MsgBox "Record Already Present"
'GoTo l
'End If
'rs1.MoveNext
'Wend
'End If
End If
'l:
End Sub
Private Sub assign()
rs1.Fields(1) = txtdate.Value
rs1.Fields(2) = cbplan.Text
rs1.Fields(3) = cbterm.Text & Yrs
rs1.Fields(4) = cbmode.Text
rs1.Fields(5) = cbinst.Text
rs1.Fields(6) = cbcost.Text
rs1.Fields(7) = txtname.Text
rs1.Fields(8) = txtage.Text
rs1.Fields(9) = Switch(Option1, "MALE", Option2, "FEMALE")
rs1.Fields(10) = txtrname.Text
rs1.Fields(11) = txtnname.Text
rs1.Fields(12) = txtnage.Text
rs1.Fields(13) = txtnrelation.Text
rs1.Fields(14) = txtaddress.Text
rs1.Fields(15) = txtcode.Text
rs1.Fields(16) = txtregno.Text
rs1.Fields(18) = Switch(Option3, "S/O", Option4, "W/O", Option5, "D/O")
rs1.Fields(19) = "N"
End Sub
Private Sub database6()
Set rs6 = New Recordset
rs6.LockType = adLockOptimistic
rs6.CursorLocation = adUseServer
rs6.CursorType = adOpenKeyset
rs6.Open "Select * from Fine", db
End Sub
Private Sub agentassign(st As String)
Dim s(100) As String
Dim n As Variant
Dim i, j, l, d As Integer
Call databasenew
rs.Open "select IntroNo, CodeNo from AgentInfo where CodeNo='" & st & "'", d1
If rs.Fields(0) <> rs.Fields(1) Then
Do
If j = 0 Then
While Not rs.EOF
s(l) = rs.Fields(0)
l = l + 1
j = l
rs.MoveNext
Wend
End If
Call databasenew1
rs1.Open "select IntroNo from AgentInfo where CodeNo='" & s(i) & "' and CodeNo <> IntroNo", d1
While Not rs1.EOF
s(j) = rs1.Fields(0)
j = j + 1
rs1.MoveNext
Wend
i = i + 1
Loop While i < j
End If
s(j + 1) = st
Call databasenew1
rs1.Open "select IntroNo, Unit from AgentInfo where CodeNo='" & st & "'", d1
txtintro.Text = rs1!INTRONO
txtunit.Text = rs1!Unit
For Each n In s
If n <> "" Then
Call databasenew1
rs1.Open "select Pos,IntroNo from AgentInfo where CodeNo='" & n & "'", d1
Select Case (rs1!Pos)
Case "Agent"
If txtagent.Text = "" Then txtagent.Text = n
Case "DM"
If txtdepman.Text = "" Then txtdepman.Text = n
Case "ADM"
If txtarea.Text = "" Then txtarea.Text = n
Case "RDM"
If txtregman.Text = "" Then txtregman.Text = n
Case "DA"
If txtdepadv.Text = "" Then txtdepadv.Text = n
Case "DA-I"
If txtdepadv1.Text = "" Then txtdepadv1.Text = n
Case "DA-II"
If txtdepadv2.Text = "" Then txtdepadv2.Text = n
Case "DA-III"
If txtdepadv3.Text = "" Then txtdepadv3.Text = n
Case "CED"
If txtchf.Text = "" Then txtchf.Text = n
End Select
End If
Next
End Sub
Private Sub databasenew()
Set d1 = New Connection
d1.Provider = "Microsoft.Jet.OLEDB.4.0"
d1.Open App.Path & "\Jeevan.mdb"
Set rs = New Recordset
rs.LockType = adLockOptimistic
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
End Sub
Private Sub databasenew1()
Set d1 = New Connection
d1.Provider = "Microsoft.Jet.OLEDB.4.0"
d1.Open App.Path & "\Jeevan.mdb"
Set rs1 = New Recordset
rs1.LockType = adLockOptimistic
rs1.CursorLocation = adUseServer
rs1.CursorType = adOpenKeyset
End Sub
Private Sub report()
Dim j As Integer
Dim pa, pb, pc, pd As Integer
'pa = pb = pc = pd = 0
If rs1.RecordCount <> 0 Then
Printer.ScaleMode = 7
Printer.CurrentY = 2
Printer.CurrentX = 6
Printer.FontBold = True
Printer.FontSize = 14
'Printer.PaintPicture Image1, 5.3, 1.7, 0.9, 0.9
Printer.Print "Jeevan Vaisya Green AgroTech LLP"
Printer.FontBold = False
Printer.FontSize = 10
Printer.CurrentX = 5
Printer.Print "Regd. off: A-46, Suburaman Street West, Gandhiji Main Road,"
Printer.CurrentX = 7
Printer.Print "Thirunagar 1st Stop, Madurai - 625006."
Printer.CurrentX = 8
Printer.Print "Ph: 0452-4367415,4367416."
Printer.Print
Printer.Print
Printer.CurrentX = 8
Printer.Print "Policy Daily Report Form"
Printer.FontSize = 9
Printer.CurrentY = 5
Printer.CurrentX = 2
Printer.Print "Policy Date: " & datechange(rs1.Fields(2))
Printer.CurrentY = 5
Printer.CurrentX = 16
Printer.Print "Time: " & Format(Now, "hh:mm AM/PM")
Printer.Print "_______________________________________________________________________________________________________________________________________________________________________________________________________________"
'1
Printer.CurrentY = 6
Printer.CurrentX = 1
'2
X = Printer.CurrentX
Printer.Print "S.No."
Printer.CurrentY = 6
Printer.CurrentX = 3.5
'6
X = Printer.CurrentX
Printer.Print "Name"
Printer.CurrentY = 6
Printer.CurrentX = 7.5
'9
Printer.Print "Policy No."
Printer.CurrentY = 6
Printer.CurrentX = 10.5
Printer.Print "Date"
'12
Printer.CurrentY = 6
Printer.CurrentX = 13
Printer.Print "Mode"
'14
Printer.CurrentY = 6
Printer.CurrentX = 14.5
Printer.Print "Amt"
'15
Printer.CurrentY = 6
Printer.CurrentX = 16.5
Printer.Print "Code"
'18
Printer.CurrentY = 6
Printer.CurrentX = 18.5
X = Printer.CurrentX
Printer.Print "Signature"
Printer.Print "_______________________________________________________________________________________________________________________________________________________________________________________________________________"
Printer.Print
Y = Printer.CurrentY
'name,jvm,datecom,mode,amt,dcode
While Not rs1.EOF
Dim i As Integer
j = j + 1
Printer.CurrentY = Y
Printer.CurrentX = 1
Printer.Print j
For i = 0 To rs1.Fields().Count - 1
Printer.CurrentY = Y
'calculating individual paln amounts
If i <> 6 And i <> 7 Then
'printing customer details based on position
Printer.CurrentX = Switch(i = 0, 3, i = 1, 7, i = 2, 10, i = 3, 13, i = 4, 14.5, i = 5, 16)
Printer.Print Switch(i = 1, "JVM" & rs1.Fields(i), i = 2, datechange(rs1.Fields(i)), i = 4, Switch(rs1.Fields(6) = "PlanA" Or rs1.Fields(6) = "PlanC", (Val(rs1.Fields(i)) - (Val(rs1.Fields(i)) * 20) / 100), 1, (Val(rs1.Fields(7)) - (Val(rs1.Fields(7)) * 7) / 100)), 1, rs1.Fields(i))
Else
If rs1.Fields(i) = "PlanA" Then pa = pa + ((Val(rs1.Fields(4)) - (Val(rs1.Fields(4)) * 20) / 100))
If rs1.Fields(i) = "PlanB" Then pb = pb + ((Val(rs1.Fields(7)) - (Val(rs1.Fields(7)) * 7) / 100))
If rs1.Fields(i) = "PlanC" Then pc = pc + ((Val(rs1.Fields(4)) - (Val(rs1.Fields(4)) * 20) / 100))
If rs1.Fields(i) = "PlanD" Then pd = pd + ((Val(rs1.Fields(7)) - (Val(rs1.Fields(7)) * 7) / 100))
End If
'commission & total value calculation
If i = 4 Then
k = k + Switch(rs1.Fields(6) = "PlanA" Or rs1.Fields(6) = "PlanC", (Val(rs1.Fields(i)) - (Val(rs1.Fields(i)) * 20) / 100), 1, (Val(rs1.Fields(7)) - (Val(rs1.Fields(7)) * 7) / 100))
k1 = k1 + Switch(rs1.Fields(6) = "PlanA" Or rs1.Fields(6) = "PlanC", Val(rs1.Fields(i)), 1, Val(rs1.Fields(7)))
End If
Next
If j = 25 Then Printer.NewPage
Printer.Print
Printer.Print
Y = Printer.CurrentY
rs1.MoveNext

Wend
Printer.CurrentY = 25
Printer.Print "_______________________________________________________________________________________________________________________________________________________________________________________________________________"
Printer.Print
Printer.CurrentX = 2
Y = Printer.CurrentY
Printer.Print "Report Date: " & datechange(DTPicker1.Value)
Printer.CurrentX = 2
Printer.Print "Time: " & Format(Now, "hh:mm AM/PM")
Printer.CurrentX = 10.5
Printer.CurrentY = Y
Printer.Print "Total Collection Amount :       "; k
Printer.Print
Printer.CurrentX = 10.5
Printer.Print "Total Amount :                      "; k1
Printer.Print "_______________________________________________________________________________________________________________________________________________________________________________________________________________"
Printer.Print
Printer.CurrentX = 3
Printer.Print "Plan A : " & pa & Space(25); " Plan B : " & pb & Space(25) & " Plan C : " & pc & Space(25) & " Plan D : " & pd

Printer.EndDoc
End If
End Sub

Private Sub planD_assign(ByVal no As Long)
Set d10 = New Connection
d10.Provider = "Microsoft.Jet.OLEDB.4.0"
d10.Open App.Path & "\Jeevan.mdb"
Set rs10 = New Recordset
rs10.LockType = adLockOptimistic
rs10.CursorLocation = adUseServer
rs10.CursorType = adOpenKeyset
rs10.Open "select * from PlanDCheque", d10
rs10.AddNew
rs10.Fields(0) = str(no)
rs10.Fields(1) = txtname.Text
rs10.Fields(2) = txtdate.Value
rs10.Fields(3) = cbcost.Text
rs10.Update
End Sub


